<!-- 公告详情 -->
<template>
    <view>
        <status-bar title='公告详情' :goHome='fromShare'></status-bar>
        <view class="padding30">
            <view class="size46 color_22 p-bot20">{{pageData.website_article_title}}</view>
            <view class="size26 color_99">{{pageData.website_article_addtime}}</view>
            <view class="m-top40">
				<u-parse :content="pageData.website_article_content" :domain="imgUrl" :scrollTable="true" :selectable="true" :useAnchor="true"></u-parse>
			</view>
            <view class="m-top40" v-if="pageData.goods">
                <view class="related bor_radius_6 m-top20 d-flex" v-for="(item,index) in pageData.goods" :key="index"
                    @click="toGoods(item.goods_id)">
                    <image :src="$imgUrls(item.img)" mode="aspectFill" class="img"></image>
                    <view class="p-left18 p-top6 flex-1">
                        <view class="h6 color_11 ellipsis m-bot10">{{ item.name }}</view>
                        <view class="size28 bold" style="color: #F37F2E;">￥{{ item.price }}</view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    data(){
        return {
            fromShare: 0,
            imgUrl: this.imgUrl,
            pageData: ''
        }
    },
    onLoad(e){
        this.getDetail(e.id)
    },
    methods: {
        getDetail(id){
            this.$http.get({
                url: '/PrivateSphereApi/getResourceDetail',
                data: {
                    id
                }
            }).then(res=>{
                if(res.code != 200) return this.$Toast(res.msg)
                this.pageData = res.data
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.related {
    height: 120rpx;      
    box-shadow: 1rpx 2rpx 9rpx 1rpx rgba(56,56,56,0.15);
    padding: 18rpx;
    .img {
        width: 84rpx;
        height: 84rpx;
    }
}
</style>